//
//  CategoryTabelViewCell.m
//  EasyBuy
//
//  Created by Zhu Xiangjun on 10/10/12.
//  Copyright (c) 2012 shen donghao. All rights reserved.
//

#import "CategoryTabelViewCell.h"
#import "ImageCacheSupport/ImageLoadView.h"

@interface CategoryTabelViewCell(){
    ImageLoadView *loadView;
    UITextField   *typeTitleFiled;
}

@end

@implementation CategoryTabelViewCell

-(void)dealloc{
    [super dealloc];
    [loadView release];
    [typeTitleFiled release];
}

-(void)initCellWithCategoryItemData:(CategoryData *)categoryItemData{
    [loadView setImageUrl:categoryItemData.typeicon];
    typeTitleFiled.text = categoryItemData.typetitle;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        ImageLoadView *_loadView = [[ImageLoadView alloc]initWithFrame:CGRectMake(10, 10, 30, 30)];
        loadView = _loadView ;
        [self addSubview:loadView];
        [_loadView release];
        
        UITextField *_typeTitleField = [[UITextField alloc] initWithFrame:CGRectMake(loadView.frame.origin.x+loadView.frame.size.width+15, 18, 150, 20)];
        _typeTitleField.enabled = NO;
        _typeTitleField.font = [UIFont systemFontOfSize:17.0f];
        _typeTitleField.textColor = [UIColor grayColor];
        typeTitleFiled = _typeTitleField;
        [self addSubview:typeTitleFiled];
        [_typeTitleField release];
        
        
        
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

}

@end
